package ma.co.ba.BusinessApplications.model;

import java.util.Date;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import ma.co.ba.BusinessApplications.model.Work;

@Entity
@Table(name = "MISSIONS")
public class Mission {

	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	
	
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	private int id;
	@Column(name = "IDENTIFIANT_MISSION", nullable = false, length = 100)
	private int identifiantMission;
	@Column(name = "INTITULE_MISSION", length = 250)
	private String intituleMission;
	@Column(name = "DATEINITIATIONMISSION")
    private Date dateInitiationMission;
	@Column(name = "DATECONFIRMATIONMISSION")
	private Date dateConfirmationMission;
	@Column(name = "DATEDEBUTMISSION")
	private Date dateDebutMission;
	@Column(name = "BUDGETTPSPREV")
	private int budgetTpsPrev;
	@Column(name = "HONORAIRESPREV")
	private float honorairesPrev;
	@Column(name = "HONORAIRESDEF")
	private float honorairesDef;
	@Column(name = "DATEDINMISSION")
	private Date dateDinMission;
	@ManyToOne(fetch = FetchType.EAGER)
	private Utilisateur utilisateur;
	@ManyToOne(fetch = FetchType.EAGER)	
	private Client client;
	@Column(name = "DATEFINP")
	private Date dateFinP;
	@Column(name = "OBS")
	private String obs;
	@ManyToOne(fetch = FetchType.EAGER)
	private TypeMission typeMission;
	
	
	/**
	 * @return the obs
	 */
	public String getObs() {
		return obs;
	}

	/**
	 * @param obs
	 *            the obs to set
	 */
	public void setObs(String obs) {
		this.obs = obs;
	}
	/**
	 * @return the id
	 */
	public int getId() {
		return id;
	}

	/**
	 * @param id the id to set
	 */
	public void setId(int id) {
		this.id = id;
	}

	/**
	 * @return the identifiantMission
	 */
	public int getIdentifiantMission() {
		return identifiantMission;
	}

	/**
	 * @param identifiantMission the identifiantMission to set
	 */
	public void setIdentifiantMission(int identifiantMission) {
		this.identifiantMission = identifiantMission;
	}

	/**
	 * @return the intituleMission
	 */
	public String getIntituleMission() {
		return intituleMission;
	}

	/**
	 * @param intituleMission the intituleMission to set
	 */
	public void setIntituleMission(String intituleMission) {
		this.intituleMission = intituleMission;
	}

	/**
	 * @return the dateInitiationMission
	 */
	public Date getDateInitiationMission() {
		return dateInitiationMission;
	}

	/**
	 * @param dateInitiationMission the dateInitiationMission to set
	 */
	public void setDateInitiationMission(Date dateInitiationMission) {
		this.dateInitiationMission = dateInitiationMission;
	}

	/**
	 * @return the dateConfirmationMission
	 */
	public Date getDateConfirmationMission() {
		return dateConfirmationMission;
	}

	/**
	 * @param dateConfirmationMission the dateConfirmationMission to set
	 */
	public void setDateConfirmationMission(Date dateConfirmationMission) {
		this.dateConfirmationMission = dateConfirmationMission;
	}

	/**
	 * @return the dateDebutMission
	 */
	public Date getDateDebutMission() {
		return dateDebutMission;
	}

	/**
	 * @param dateDebutMission the dateDebutMission to set
	 */
	public void setDateDebutMission(Date dateDebutMission) {
		this.dateDebutMission = dateDebutMission;
	}

	/**
	 * @return the budgetTpsPrev
	 */
	public int getBudgetTpsPrev() {
		return budgetTpsPrev;
	}

	/**
	 * @param budgetTpsPrev the budgetTpsPrev to set
	 */
	public void setBudgetTpsPrev(int budgetTpsPrev) {
		this.budgetTpsPrev = budgetTpsPrev;
	}

	/**
	 * @return the honorairesPrev
	 */
	public float getHonorairesPrev() {
		return honorairesPrev;
	}

	/**
	 * @param honorairesPrev the honorairesPrev to set
	 */
	public void setHonorairesPrev(float honorairesPrev) {
		this.honorairesPrev = honorairesPrev;
	}

	/**
	 * @return the honorairesDef
	 */
	public float getHonorairesDef() {
		return honorairesDef;
	}

	/**
	 * @param honorairesDef the honorairesDef to set
	 */
	public void setHonorairesDef(float honorairesDef) {
		this.honorairesDef = honorairesDef;
	}

	/**
	 * @return the dateDinMission
	 */
	public Date getDateDinMission() {
		return dateDinMission;
	}

	/**
	 * @param dateDinMission the dateDinMission to set
	 */
	public void setDateDinMission(Date dateDinMission) {
		this.dateDinMission = dateDinMission;
	}

		
	/**
	 * @return the dateFinP
	 */
	public Date getDateFinP() {
		return dateFinP;
	}

	/**
	 * @param dateFinP the dateFinP to set
	 */
	public void setDateFinP(Date dateFinP) {
		this.dateFinP = dateFinP;
	}

	

	/**
	 * @return the budgetTpsPrevH
	 */
	public int getBudgetTpsPrevH() {
		return budgetTpsPrevH;
	}

	/**
	 * @param budgetTpsPrevH the budgetTpsPrevH to set
	 */
	public void setBudgetTpsPrevH(int budgetTpsPrevH) {
		this.budgetTpsPrevH = budgetTpsPrevH;
	}

	/**
	 * @return the exercice
	 */
	public int getExercice() {
		return Exercice;
	}

	/**
	 * @param exercice the exercice to set
	 */
	public void setExercice(int exercice) {
		Exercice = exercice;
	}

	/**
	 * @return the nbExercice
	 */
	public int getNbExercice() {
		return NbExercice;
	}

	/**
	 * @param nbExercice the nbExercice to set
	 */
	public void setNbExercice(int nbExercice) {
		NbExercice = nbExercice;
	}

	/**
	 * @return the idChefMission
	 */
	public String getIdChefMission() {
		return idChefMission;
	}

	/**
	 * @param idChefMission the idChefMission to set
	 */
	public void setIdChefMission(String idChefMission) {
		this.idChefMission = idChefMission;
	}

	/**
	 * @return the descriptionMission
	 */
	public String getDescriptionMission() {
		return descriptionMission;
	}

	/**
	 * @param descriptionMission the descriptionMission to set
	 */
	public void setDescriptionMission(String descriptionMission) {
		this.descriptionMission = descriptionMission;
	}

	/**
	 * @return the missionAffecte
	 */
	public boolean isMissionAffecte() {
		return missionAffecte;
	}

	/**
	 * @param missionAffecte the missionAffecte to set
	 */
	public void setMissionAffecte(boolean missionAffecte) {
		this.missionAffecte = missionAffecte;
	}


	@Column(name = "BUDGETTPSPREVH")
	private int budgetTpsPrevH;
	@Column(name = "EXERCICE")
	private int Exercice;
	@Column(name = "NBEXERCICE")
	private int NbExercice;
	@Column(name = "ID_CHEF_MISSION")
	private String idChefMission;
	@Column(name = "DESCRIPTION_MISSION")
	private String descriptionMission;
	@Column(name = "MISSION_AFFECTE")
	private boolean missionAffecte;




	public Mission() {

	}

}
